﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using Manage_Garage_Car.BusinessObject;
using Manage_Garage_Car.DataAccessLayer;
using System.Windows;

namespace Manage_Garage_Car.BusinessLogiclayer
{
    class CarStyleBusiness
    {
        #region Fields

        private ConnectData m_connectData = new ConnectData();

        private SqlParameter[] m_sqlParam;

        private CarStyle m_carStyle;

        #endregion

        #region Properties

        public void GetNameCarSqlParam(string _nameCarStyle)
        {
            m_sqlParam[0] = new SqlParameter("@TenHieuXe", SqlDbType.VarChar, 50);
            m_sqlParam[0].Direction = ParameterDirection.InputOutput;
            m_sqlParam[0].Value = null;
        }

        public void GetAllSqlParam(CarStyle _carStyle)
        {
           
        }

        public DataTable GetDataStyleCar()
        {
            return m_connectData.GetDataTable("LOADHIEUXE");
        }

        public void SetDataStyleCar(string _nameCarStyle, string _productCountry, string _note)
        {
            m_sqlParam[0] = new SqlParameter("@TenHieuXe", SqlDbType.VarChar, 50);
            m_sqlParam[0].Value = _nameCarStyle;
            m_sqlParam[1] = new SqlParameter("@NuocSanXuat", SqlDbType.NVarChar, 50);
            m_sqlParam[1].Value = _productCountry;
            m_sqlParam[2] = new SqlParameter("@GhiChu", SqlDbType.NVarChar, 200);
            m_sqlParam[2].Value = _note;

            m_connectData.SetDataTable("ADDHIEUXE", m_sqlParam);
        }

        #endregion

        #region Initialization

        public CarStyleBusiness()
        {
            m_connectData = new ConnectData();
            m_sqlParam = new SqlParameter[3];
            m_carStyle = new CarStyle();
        }

        #endregion
    }
}